Skip to content

feat(qt): 正式 Qt 八会话文本输入目标隔离与生命周期(#30 切片) - #328

Merged
JavaZeroo merged 2 commits into
mainfrom
agent/eight-session-isolation/unicode-qt-verify-e11985a21ddf
Nov 7, 2026
Merged

JavaZeroo merged 2 commits into
mainfrom
agent/eight-session-isolation/unicode-qt-verify-e11985a21ddf

Conversation

@JavaZeroo-Bot

@JavaZeroo-Bot JavaZeroo-Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

范围

在同一个正式 C++ / Qt Widgets / 随包固定 Microsoft ConPTY 构建中,补 #30 的独立切片:八会话文本输入目标隔离与生命周期(不重复 #313 的 Unicode glyph/呈现实验,不消费 #27 隐藏帧决定)。

  • 仅通过现有公开 + / 标签切换 / 关闭入口创建 8 个真实固定 ConPTY child(+1 个替代页),不直接拼装 8 个 model。
  • 每个 child 打印 TF8_READY pid=<pid> nonce=<16hex> 并写独立 <nonce>.bin 接收文件;测试用 model.resize_state().child_pid 绑定 PID,比较硬编码字面预期(ASCII/CJK/补充平面/结合标 + 无修饰 Home),不读取产品输出来生成 expected。
  • 覆盖:非创建顺序切换 [4,0,7,2,5,1,6,3];8×120 行受控有界后台输出期间后台 child 排空且不夺取输入目标;关闭非活动/活动标签后存活目标精确接收;替代页不继承已关闭会话的待发 UTF-16 单元;父窗口关闭后所有存活会话 cleanup_verified/active_processes_after=0,外层 Job active=0。
  • 不修改产品行为,不定义/测试第 9 个会话上限;不涉及 Ctrl 字母、应用模式或字素宽度策略。

改动

  • src/qt/eight_session_test.cpp(新):上述矩阵/生命周期测试与 JSON 证据记录。
  • experiments/shell/eight_session_client.cpp(新):独立接收(增量 UTF-8 落盘)+ 身份 READY + 受控 120 行后台输出夹具。
  • CMakeLists.txt:新 fixture 与 qt_eight_session_test / CTest qt_eight_session(offscreen + OwnedJob supervisor)。
  • CI:.github/workflows/qt-cpp.yml 构建目标、运行时清单与 CTest 选择加入新测试。
  • 文档:experiments/shell/results/2026-11-08-qt-eight-session-isolation/(README + validation.json)、src/qt/README.md、docs/FEATURES.md、docs/EVIDENCE.md。

验证(同源码实测)

  • 新测试连跑两次通过(~2.93 s);每次 9 个身份(8 创建 + 1 替代),三次关闭(非活动/活动/待发目标)页面释放,6 个存活会话在父窗关闭时全部 finished/cleanup_verified/active_processes_after=0,status=0,supervisor job_after={active:0,total:20,terminated:0}。
  • 每次运行均含:8 条创建顺序字面输入、8 条非创建顺序字面输入、3 条 survivor/替代输入(两次关闭后的存活目标各 1 条、替代页 1 条;合计 19 个输入步骤),expected_hex == actual_hex;8 个后台块全部 seq=120、queued_bytes=0。
  • Qt 正式路径 CTest 12/12(23.23 s,去除需人工剪贴板的 hosted clipboard 两项);默认/核心 CTest 42/42(23.40 s)与 Python 核心 31 项(含 15 Unicode)通过。
  • 详情与全部身份:experiments/shell/results/2026-11-08-qt-eight-session-isolation/validation.json。

边界与未验证

复验与全部身份见 固定结果。

JavaZeroo-Bot and others added 2 commits November 8, 2026 03:34
Add qt_eight_session: eight real children are created only through the public
+/tab-switch/close entries, each with its own PID, process-local nonce and
incremental UTF-8 receive file. Hard-coded literal expectations (ASCII, CJK,
supplementary plane, combining mark, and the unmodified Home key) must reach
only the active target, including through a non-creation-order switch sequence.
A controlled 120-line-per-child background block proves inactive children keep
draining and never take the input target. Closing a non-active and then the
active tab must leave surviving targets receiving exactly their literal bytes;
a replacement tab must not inherit a closed tab's pending UTF-16 unit; a parent
window close must complete every remaining session with cleanup_verified and
active_processes_after=0 under the OwnedJob supervisor.

The session matrix, PID/nonce/file identities, per-step expected/actual hex and
timing, bounded background sequences, close timings and parent-close states are
recorded for review. This is an offscreen synthetic-event check: presented_done
is null, and no physical keyboard, native IME, system clipboard or ninth-session
policy is claimed. SessionTabs currently has no session cap; the approved eight
session basis is verified, not extended. #30/#155 stay open.

Co-authored-by: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com>
Record the final two-run and regression results for qt_eight_session in
validation.json: per-session PID/nonce/receiver-file matrix, per-step literal
expected/actual bytes and timing, non-creation-order switch coverage, bounded
background sequences and queue drain, close timings, replacement pending-unit
isolation, parent-close cleanup states, and the fixed dependency/source/binary
identities. Align the report's measured values with the final runs.

The recorded implementation sources still match the implementation commit; this
follow-up changes only documentation. #30/#155 stay open.

Co-authored-by: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com>
@JavaZeroo
JavaZeroo merged commit 8506c6c into main Nov 7, 2026
10 checks passed
JavaZeroo-Bot added a commit that referenced this pull request Nov 12, 2026
…ecord-hidden-retention-2e7373117ea0

Union both sides: keep the bounded autoscroll Qt target/CTest entry and
the #324 system paste, #333 BCD fixtures, #330/#331 packaging and
#328 eight-session capabilities with their assertions.

Co-authored-by: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants